#include "StdAfx.h"
#include "Enemy.h"


Enemy::Enemy(Ogre::SceneManager* manager)
{
	this->mSceneMgr = manager;

	enemyNode = mSceneMgr->getRootSceneNode()->createChildSceneNode();

	// Creation du pinguin
	Ogre::Entity *pinguin = mSceneMgr->createEntity("Pinguin", "penguin.mesh");

	// On attache tous les objets au noeud
	enemyNode->attachObject(pinguin);
	enemyNode->setScale(0.3, 0.3, 0.3);
	enemyNode->setPosition(0, 8, 0);
	enemyNode->setVisible(false);
}

Enemy::~Enemy(void)
{
	delete this->enemyNode;
	delete this->mSceneMgr;
}

void Enemy::Update(Ogre::Vector3 pos, Ogre::Radian ang)
{
	this->enemyNode->setPosition(pos.x, pos.y, pos.z);
	enemyNode->setVisible(true);
}